1. Field of the Invention
The present invention relates in general to microprocessor systems and, more particularly, to a system, method, and mechanism providing direct memory access (DMA) between system components and memory without imposing on the processor.
2. Relevant Background
Conventional computer architectures facilitate data movement between input/output (I/O) devices and system memory by providing a hardware mechanism that implements Direct Memory Access (DMA). DMA transfer allows data to be read from an I/O device and written to a designated location in memory, or read from a designated location in memory and written to an I/O device without involvement by a central processing unit (CPU). This functionality takes advantage of the fact that hardware controlled system data transfers are often faster than transfers involving the CPU. Also, the CPU is free to perform other useful work while the DMA transfer takes place. Direct memory access (DMA) is a way for computer peripheral devices to communicate with working memory without involving the CPU. DMA is a very fast way of transferring blocks of data when no processing is required and is a conventional method by which hard disks, soundboards and data acquisition equipment send and receive data to and from memory.
A DMA transfer can be initiated by a peripheral or the central processing unit (CPU) itself. A DMA controller coupled to system bus actually manages DMA transfers. The system bus is coupled directly or indirectly to the CPU, peripherals, and the main memory. Most DMA systems provide multiple DMA xe2x80x9cchannels,xe2x80x9d wherein each DMA channel is assigned to a particular I/O device.
Current DMA implementations involve a DMA controller that is closely coupled to the peripherals and system bus. By closely coupled it is meant that a relatively complex interface exists between peripherals using DMA and the DMA controller. This interface enables the peripheral and DMA controller to exchange state information to make the DMA exchange take place and cause the DMAC to issue a DMA transfer acknowledge. Usually this interface must be implemented with a large number of signal wires to handle tasks of initiating, synchronizing, and performing DMA transfers.
These types of implementations are difficult to scale to large numbers of peripherals. The number of signal lines required to implement the complex interface increases with the number of peripherals. The length and complexity of signal lines-becomes restrictive to large system-on-a-chip designs. Moreover, the complex interface imposes a significant overhead in terms of signaling hardware on the peripherals that use DMA. A need exists for a processor implementing DMA and a DMA implementation method with reduced hardware overhead that is readily scaleable and readily implemented in DMA peripherals.
Another limitation of many DMA implementations is that the close coupling of the DMAC with the peripherals makes it difficult to reuse the circuit designs in other implementations. Design reuse is an increasingly important criteria, especially in embedded system design. A need exists for a mechanism and method for coupling DMA components to implement DMA transfers using a general purpose system bus for communication between the components.
The present invention involves a computer system having a simple handshake protocol for implementing DMA transfers. A system bus is provided having a plurality of ports for coupling to system components including memory, central processing unit(s) and peripherals. A direct memory access controller (DMAC) is provided with a peripheral-independent interface coupled to the system bus and communicates with the system bus using system bus defined transactions. The DMAC comprises a set of registers. A central processing unit (CPU) configures teh DMAC by loading values into the DMAC registers. The configured DMAC issues an enable signal to a selected system component identified in the DMAC registers. A peripheral request interface is associated with the selected system components and communicates with the system bus using the system bus defined transactions. The selected system component asserts a request signal to the DMAC. In response to the request signal, the DMAC implements a DMA transfer according to the values stored in the DMAC configuration registers. Peripheral-specific signaling is provided to the system component by the peripheral request interface.
To conduct the DMA transfer the DMAC initiates a LOAD transaction request with a source peripheral specified in DMAC registers. The LOAD transaction is associated with a DMA acknowledge. The peripheral request interface responds to the LOAD transaction request and the DMA acknowledge by initiating peripheral-specific signaling to access data specified by the LOAD request. The peripheral request interface completes the LOAD transaction by supplying a LOAD response to the DMAC over the system bus. The DMAC receives and buffers the LOAD response and initiates a STORE transaction request to transfer the specified data to a destination system component specified by the DMAC registers.